package com.red.usespringboot;

import com.red.usespringboot.properties.MyProperties;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
public class UserService {

    @Autowired
    private MyProperties myProperties;

    public void test(){
        System.out.println("获取bean 输出"+myProperties.getPwd());
    }
}
